using UnityEngine;
using UnityEngine.UI;

public class UI_InGame_Pause : MonoBehaviour
{
	public Button _Btn_继续游戏;

	public Button _Btn_调戏休整;

	public Button _Btn_改日再战;

	public CanvasGroup _CG;

	public Text _Text_游戏时长;

	public void F_显示()
	{
        AdManager.Instance.ShowNative(0);
		_CG.alpha = 1f;
		_CG.blocksRaycasts = true;
		float gameTime = MonoSingleton<GameManager>.Instance._GameTime;
		int num = (int)(gameTime / 60f);
		_Text_游戏时长.text = string.Format("当前存档游玩时间\n{0}分{1}秒", num, (gameTime - (float)(num * 60)).ToString("00.00"));
	}

	public void F_隐藏()
	{
		_CG.alpha = 0f;
		_CG.blocksRaycasts = false;
	}

	private void Start()
	{
		F_隐藏();
		_Btn_继续游戏.onClick.AddListener(delegate
		{
			MonoSingleton<GameManager>.Instance.F_继续游戏();
			MonoSingleton<AudioManager>.Instance.F_Play_UI_点击();
		});
		_Btn_调戏休整.onClick.AddListener(delegate
		{
			MonoSingleton<AudioManager>.Instance.F_Play_UI_点击();
		});
		_Btn_改日再战.onClick.AddListener(delegate
		{
			MonoSingleton<GameManager>.Instance.F_返回主页();
			MonoSingleton<AudioManager>.Instance.F_Play_UI_点击();
            if (!AdManager.Instance.ShieldAddress) AdManager.Instance.ShowNative();
		});
	}
}
